package com.example.domain;

import java.util.Date;
import java.util.Objects;

public class t_statistic { //文章评论表
    private int id;
    private int article_id; //文章的id
    private int hits;//文章点击量
    private int comments_num;  //文章评论量

    public t_statistic() {
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        t_statistic that = (t_statistic) o;
        return id == that.id &&
                article_id == that.article_id &&
                hits == that.hits &&
                comments_num == that.comments_num;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, article_id, hits, comments_num);
    }

    public t_statistic(int id, int article_id, int hits, int comments_num) {
        this.id = id;
        this.article_id = article_id;
        this.hits = hits;
        this.comments_num = comments_num;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getArticle_id() {
        return article_id;
    }

    public void setArticle_id(int article_id) {
        this.article_id = article_id;
    }

    public int getHits() {
        return hits;
    }

    public void setHits(int hits) {
        this.hits = hits;
    }

    public int getComments_num() {
        return comments_num;
    }

    public void setComments_num(int comments_num) {
        this.comments_num = comments_num;
    }

    @Override
    public String toString() {
        return "t_statistic{" +
                "id=" + id +
                ", article_id=" + article_id +
                ", hits=" + hits +
                ", comments_num=" + comments_num +
                '}';
    }
}
